<!DOCTYPE html>
<html lang="zh-cn">
	<head>
	    <meta charset="utf-8">
	    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	    <meta name="viewport" content="width=device-width, initial-scale=1">
	    <#include "/common/meta.ftl"/>
	    <!--[if IE 6]>  
    	<style type="text/css">
	       html{
	         overflow-x:hidden;
	       }
     	</style>
		<![endif]-->
 		<!--[if gte IE 6]>
  		<style type="text/css">
		   body{
		     overflow-x:hidden;
		   }
 		</style>
 		<![endif]-->
 		<style>
 			
 			.leftMenu{
 				float : left;
 			}
 			.rightDiv{
 				margin-left:50px;
 			}
 		</style>
		<script>
			function calculateCss(){
				$("#miniMenu").height($(window).height()-80);
				$("#menu").height($(window).height()-80);
				$("#mainIframe").height($(window).height()-118);
				$("#rightDIV").css("margin-left",$("#leftDIV").width());
			}
			$(function(){
				calculateCss();
				$(window).resize(function() {
					calculateCss();
				});
			});
			function setMainIframeUrl(id , url , name ,pName , pIcon){
				$(".secondLevelMenu").hide();
				if(url==""){
					return;
				}else{
					url = '${_b}' + url;
				}
				var src = "";
				if(url.indexOf("?")!=-1){
					src = url+"&id="+id+"&noCache="+Math.random();
				}else{
					src = url+"?id="+id+"&noCache="+Math.random();
				}
				$("#mainIframe").attr("src" , src );
				$("#breadcrumbOL > li[class='added']").remove();
				if(name!=''&&pName!=''){
					$("#breadcrumbOL").append("<li class='added'>"+pName+"</li><li class='added'><a href='"+src+"' target='mainIframe'>"+name+"</a></li>");
				}
				
			}
			function collapseMenu(){
				$(".secondLevelMenu").hide();
				$("#menu").hide();
				$("#miniMenu").show();
				$("#rightDIV").css("margin-left",$("#leftDIV").width());
			}
			function collapseMenuOff(){
				$("#menu").show();
				$("#miniMenu").hide();
				$("#rightDIV").css("margin-left",$("#leftDIV").width());
			}
			function show2Menu(id){
				$('#'+id+'_A').tooltip('toggle');
				$(".secondLevelMenu").hide();
				$("#"+id).show('300');
				$("#"+id).hover(
				  function() {
				    $("#"+id).show();
				  },
				  function() {
				    $("#"+id).hide('3000');
				  }
				);
			}
			function logOut(){
				if(confirm("您确定要退出本系统吗？")){
	          		top.location.href='logOut';
				}
			}
		</script>
	</head>
	<body scroll=no style="overflow-y:hidden">
		<header id="header" class="bg-primary with-shadow">
			<div id="navbar" class="navbar headLogo" role="banner" style="margin-bottom:0px;">
				<h3><i class="icon icon-cloud"></i>&nbsp;${_sysTitle!''}</h3>
				<div style="position:absolute;right:170px;top:15px;">
					<i class="icon icon-user"></i> 
					<@shiro.principal property="userName" />
				</div>
				<div style="position:absolute;right:5px;top:10px;">
					<div class="btn-group">
					  <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
					    切换主题 <span class="caret"></span>
					  </button>
					  <ul class="dropdown-menu" role="menu" style="min-width:85px;">
					    <li>
                		<a tabindex="-1"  href="javascript:_changeTheme('black');"> <span style="color:#333;">black</span></a>
                	</li>
                	<li>
                		<a tabindex="-1"  href="javascript:_changeTheme('bluegrey');"> <span style="color:#607D8B;">bluegrey</span></a>
                	</li>
                	<li>
                		<a tabindex="-1"  href="javascript:_changeTheme('brown');"> <span style="color:#8D6E63;">brown</span></a>
                	</li>
                	<li>
                		<a tabindex="-1"  href="javascript:_changeTheme('green');"> <span style="color:#4caf50;">green</span></a>
                	</li>
              		<li>
                		<a tabindex="-1"  href="javascript:_changeTheme('indigo');"> <span style="color:#3F51B5;">indigo</span></a>
                	</li>
                	<li>
                		<a tabindex="-1"  href="javascript:_changeTheme('purple');"> <span style="color:#8666b8;">purple</span></a>
                	</li>
                	<li>
                		<a tabindex="-1"  href="javascript:_changeTheme('red');"> <span style="color:#d9534f;">red</span></a>
                	</li>
                	<li>
                		<a tabindex="-1"  href="javascript:_changeTheme('skyblue');"> <span style="color:#3280fc;">skyblue</span></a>
              		</li>
                	<li>
                		<a tabindex="-1"  href="javascript:_changeTheme('yellow');"> <span style="color:#d0884d;">yellow</span></a>
                	</li>
					  </ul>
					  <button class="btn btn-primary" type="button" onclick="logOut()"><i class="icon icon-off"></i> 退出</button>
					</div>
					
				</div>
			</div>
		</header>
	      	<div class="" style="">
	      		<div id="leftDIV" class="leftMenu" style="border-bottom:1px solid #ddd;">
	      			<#include "/sys/_menu.ftl"/>
	      		</div>
  				<div id="rightDIV" class="rightDiv" style="">
  					<div class="" style="padding:0px;background-color:#f1f1f1;border-bottom:1px solid #ddd;height:38px;">
					   <ol id="breadcrumbOL" class="breadcrumb" style="margin:0px;">
							<li><a href="javascript:void(0);" onclick="setMainIframeUrl('','/admin/welcome','','','')" target="mainIframe"><i class="icon icon-home"></i> 管理中心</a></li>
					   </ol>
				  	</div>
				  	<div>
				  		<iframe id="mainIframe" style="" name="mainIframe" src="./welcome" frameborder=0 border=0 width=100% height="100%"></iframe>
				  	</div>
  				</div>
  			</div>
  			<#include "/sys/_footer.ftl"/>
	</body>
</html>